<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>获取 MySQL 客户端信息</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="mysqli.get-charset.html">« mysqli::get_charset</a></li>
      <li style="float: right;"><a href="mysqli.get-client-version.html">mysqli_get_client_version »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="class.mysqli.html">MySQLi</a></li>
    <li>获取 MySQL 客户端信息</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="mysqli.get-client-info" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">mysqli::$client_info</h1>
  <h1 class="refname">mysqli::get_client_info</h1>
  <h1 class="refname">mysqli_get_client_info</h1>
  <p class="verinfo">(PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">mysqli::$client_info</span> -- <span class="refname">mysqli::get_client_info</span> -- <span class="refname">mysqli_get_client_info</span> &mdash; <span class="dc-title">获取 MySQL 客户端信息</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-mysqli.get-client-info-description">
  <h3 class="title">说明</h3>
  <p class="para">面向对象风格</p>
  <div class="fieldsynopsis"><span class="type">string</span> <var class="varname"><a href="mysqli.get-client-info.html">$mysqli-&gt;client_info</a></var>;</div>

  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>mysqli::get_client_info</strong></span>(): <span class="type">string</span></div>

  <p class="para rdfs-comment">过程化风格</p>
  <div class="methodsynopsis dc-description"><span class="methodname"><strong>mysqli_get_client_info</strong></span>(<span class="methodparam"><span class="type"><a href="class.mysqli.html" class="type mysqli">mysqli</a></span> <code class="parameter">$link</code></span>): <span class="type">string</span></div>

  <p class="para rdfs-comment">
   返回 MySQL 客户端库的版本信息。
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-mysqli.get-client-info-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   返回 MySQL 客户端库的版本信息。
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-mysqli.get-client-info-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-1457">
    <p><strong>示例 #1 mysqli_get_client_info</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /><br /></span><span style="color: #FF8000">/*&nbsp;获取客户端版本新的时候，<br />&nbsp;&nbsp;&nbsp;无需建立到数据库的连接&nbsp;*/<br /><br /></span><span style="color: #0000BB">printf</span><span style="color: #007700">(</span><span style="color: #DD0000">"Client&nbsp;library&nbsp;version:&nbsp;%s\n"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">mysqli_get_client_info</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-mysqli.get-client-info-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="mysqli.get-client-version.html" class="function" rel="rdfs-seeAlso">mysqli_get_client_version()</a> - 作为一个整数返回MySQL客户端的版本</span></li>
    <li class="member"><span class="function"><a href="mysqli.get-server-info.html" class="function" rel="rdfs-seeAlso">mysqli_get_server_info()</a> - 返回MySQL服务器的版本号</span></li>
    <li class="member"><span class="function"><a href="mysqli.get-server-version.html" class="function" rel="rdfs-seeAlso">mysqli_get_server_version()</a> - 作为一个整数返回MySQL服务器的版本</span></li>
   </ul>
  </p>
 </div>


</div></div></div></body></html>